﻿using System;
using System.Reflection;

namespace Lswweb.Domain
{
    /// <summary>
    /// 一般实现购物车有三种方式
    /// Cookie,Session,DataBase
    /// </summary>
    public static class ShoppingCartFactory
    {
        private readonly static string shoppingCartFullTypeName = "Lswweb.Domain.ShoppingCart.SessionShoppingCart,Lswweb.Domain";

        public static IShoppingCart GetShoppingCart()
        {
            return (IShoppingCart)Activator.CreateInstance(
                Type.GetType(ShoppingCartFactory.shoppingCartFullTypeName),
                false);
        }
    }
}
